package cn.itwangxiang.android.common;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class SQLiteUtils extends SQLiteOpenHelper {

	public SQLiteUtils(Context context) {
		super(context, "mydb.db", null, 1);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "CREATE TABLE person (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT) ";
		db.execSQL(sql);
		
		db.execSQL("INSERT INTO person (name) VALUES ('itwangxiang')");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}

}
